package kr.hyunist.androidcomplete01saeildamil.ch19;

import kr.hyunist.androidcomplete01saeildamil.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class LongTimeEx01 extends Activity {
	int mValue;
	TextView mText;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.longtimeex);
		
		mText = (TextView) findViewById(R.id.longtimetv);
	}
	
	public void mOnClick(View v){
		mValue = 0;
		Update();
	}

	private void Update() {
		for(int i = 0; i < 100; i++){
			mValue++;
			mText.setText(Integer.toString(mValue));
			
			try {
				Thread.sleep(100);				
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
	
	
}
